/* 

app.css

 */

/*对三屏幕做适应(官方有自带网格，所以只针对新添控件做了适应修改)*/


@media screen and (max-width: 599px) {
    .am-sidebar {
        -webkit-transform: translate3d(-100%, 0, 0);
        transform: translate3d(-100%, 0, 0);
        -webkit-transition: -webkit-transform 0.3s;
        transition: -webkit-transform 0.3s;
    }

    .am-sidebar.am-sidebar--open {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }

    .am-sidebar.am-sidebar--open ~ .am-main {

        pointer-events: none;
    }

    .am-sidebar .close-button {
        opacity: 1;
        pointer-events: auto;
    }

    .content__item {
        padding: 80px 20px 40px;
    }

    .content .close-button {
        padding: 10px 20px;
    }

    .content .close-button::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid #f5f5f5;
        width: 100vw;
        height: 50px;
        pointer-events: none;
        z-index: -1;
    }

}

@media screen and (min-width: 600px) {

    .am-sidebar{
        -webkit-transition: -webkit-transform 0.5s;
        transition: transform 0.5s;
    }
    .am-main {

        height: 100%;
        margin-left: 300px;
    }
    .m18-item {
        padding: 45px 45px 30px;
    }
    .content__item {
        right: 0;
        padding-left: 340px;
    }

}

@media screen and (min-width: 900px){


    .m18-item {

        border: none;
    }


    .m18-item--loading.grid__item::before {
        opacity: 0;
    }


}

/*控制整体的背景，字体，颜色*/

body {
    background: #fff;
    color: #7b7b7b;
    font-weight: 400;
    font-size: 16px;
    font-family: "Martel Sans", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
    overflow-y: scroll;
}

a {
    outline: none;
    color: #81c483;
    text-decoration: none;
}

a:hover,
a:focus {
    color: #333;
    outline: none;
}

button:focus {
    outline: none;
}
input:focus{

    outline: none;

}

.noscroll {
    overflow: hidden;
}

/*  新增侧边栏 需要给一个具体的宽度,默认300px */
.am-sidebar {
    text-align: center;
    background: #f5f5f5;
    z-index: 1000;
    position: fixed;
    width: 300px;
    max-width: 100%;
    height: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    padding: 2em 1em;
}

.am-sidebar h1 {
    margin: 0.75em 0 0;
    font-size: 2em;
    line-height: 1;
}

.am-sidebar h1 span {
    display: block;
}


/* 关闭按钮 (针对侧边栏与正文) */
.close-button {
    position: absolute;
    border: none;
    background: none;
    margin: 0;
    z-index: 100;
    top: 0;
    right: 0;
    font-size: 18px;
    color: #ddd;
    cursor: pointer;
    pointer-events: none;
    padding: 20px 30px;
    opacity: 0;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-transition: opacity 0.3s;
    transition: opacity 0.3s;
}


.close-button span {
    display: none;
}

.close-button:focus{
    display: none;
}
.close-button:hover {
    color: #7b7b7b;
}

/* 在正文显示关闭按钮 */
.close-button--show {
    opacity: 1;
    pointer-events: auto;
}


/*右侧主体页面的细节修改*/

.am-main {
    position: relative;
    z-index: 50;
}

.bar-headline {
    margin: 0;
    font-size: 0.75em;
}




/* 新增列表显示的元素 */
.m18-item {
    padding: 15px 55px 30px;
    position: relative;
    color: inherit;
    background: #fff;
    min-height: 300px;
    cursor: pointer;
    text-align: center;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-direction: normal;
    -webkit-box-orient: vertical;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-justify-content: center;
    justify-content: center;
}
.m18-item::before {
    position: absolute;
    content: '';
    top: 0px;
    right: 55px;
    bottom: 0px;
    left: 55px;
    border-bottom: 1px solid rgba(74, 74, 74, 0.075);
}

.m18-item * {
    z-index: 10;
}

.m18-item{
    -webkit-transition-delay: 0s;
    transition-delay: 0s;
}

.m18-item:hover .meta--preview .am-circle,
.m18-item:focus .meta--preview .am-circle, {
    -webkit-filter: none;
    filter: none;
}

/*加载更多*/


.more-page {
    width: 100%;
    background: #fff;
    padding: 15px 15px 10px;
    text-align: center;
    font-size: 0.75em;
    font-weight: bold;
    cursor: default;
}




/*加载文章时的动画效果*/

.m18-item--loading .am-circle {
    -webkit-transition-delay: 0.1s;
    transition-delay: 0.1s;
}

.m18-item--loading .meta__date {
    -webkit-transition-delay: 0.17s;
    transition-delay: 0.17s;
}

.m18-item--loading .meta__reading-time {
    -webkit-transition-delay: 0.24s;
    transition-delay: 0.24s;
}

.m18-item--loading .am-circle,
.m18-item--loading .meta__date,
.m18-item--loading .meta__reading-time {
    -webkit-transform: scale3d(0.5, 0.5, 1);
    transform: scale3d(0.5, 0.5, 1);
    opacity: 0;
}


/*进度条*/
.loader {
    height: 1px;
    width: 40%;
    margin: 1em auto;
    position: relative;
    background: rgba(0, 0, 0, 0.1);
}


.loader::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: #a4e7ad;
    left: 0;
    top: -1px;
    -webkit-transform: scale3d(0, 1, 1);
    transform: scale3d(0, 1, 1);
    -webkit-transform-origin: 0% 50%;
    transform-origin: 0% 50%;
}




.m18-item--loading .loader::before {
    -webkit-transition: -webkit-transform 1s;
    transition: transform 1s;
    -webkit-transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
    transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
    -webkit-transform: scale3d(1, 1, 1);
    transform: scale3d(1, 1, 1);
}


/* 打开文章的动画效果 */
.m18-item--animate .title--preview {
    -webkit-transition-delay: 0s;
    transition-delay: 0s;
    opacity: 0;
    -webkit-transform: translate3d(0, -20px, 0);
    transform: translate3d(0, -20px, 0);
}

.m18-item--animate .loader {
    -webkit-transition-delay: 0.1s;
    transition-delay: 0.1s;
    opacity: 0;
    -webkit-transform: translate3d(0, -30px, 0);
    transform: translate3d(0, -30px, 0);
}

.m18-item--animate .nickName {
    -webkit-transition-delay: 0.15s;
    transition-delay: 0.15s;
    opacity: 0;
    -webkit-transform: translate3d(0, -40px, 0);
    transform: translate3d(0, -40px, 0);
}

/*正文蒙版动画*/
.placeholder {
    pointer-events: none;
    position: absolute;
    width: calc(100% + 5px);
    height: calc(100vh + 5px);
    z-index: 100;
    top: 0;
    left: 0;
    background: #fff;
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
}

.placeholder.placeholder--trans-in {
    -webkit-transition: -webkit-transform 0.5s;
    transition: transform 0.5s;
    -webkit-transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
    transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
}

.placeholder.placeholder--trans-out {
    -webkit-transition: -webkit-transform 0.5s;
    transition: transform 0.5s;
}


/*正文类*/

/* main content */
.content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    height: 0;
    /* Avoid second scroll bar in Chrome! */
    visibility: hidden;
    z-index: 400;
    overflow: hidden;
}

.content.content--show {
    height: 100vh;
    pointer-events: auto;
    visibility: visible;
}

.content__item {
    position: absolute;
    top: 0;
    width: 100%;
    overflow: hidden;
    height: 0;
    opacity: 0;
    padding: 60px 60px 80px 60px;
    pointer-events: none;
    font-size: 0.85em;
}
.content__item p {
    max-width: 1200px;
    margin: 1em auto;
    text-align: justify;
}
.content__item p:first-of-type {
    font-size: 1.35em;
}

.content__item.content__item--show {
    height: auto;
    min-height: 100vh;
    opacity: 1;
    pointer-events: auto;
    -webkit-transition: opacity 0.6s;
    transition: opacity 0.6s;
}
/* 文章滚动条 */
.scroll-wrap {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    z-index: 1;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
}


/* 正文内容动画效果 */

.category--full {
    font-size: 1.25em;
    margin-bottom: 20px;
    color: #81c483;
}

.title--full {
    font-size: 3.25em;
}

.meta--full {
    font-size: 1em;
    margin: 0 auto 2em;
    max-width: 1200px;
}

.meta--full .meta__author {
    display: block;

    font-weight: bold;
    margin-bottom: 20px;
}
.meta--full .meta__author::before {
    content: '';
    font-weight: normal;
    font-family: fontawesome;
}
.meta--full .meta__category {
    font-style: italic;
    float: left;
    margin: 0 5px;
    font-family: "Playfair Display", serif;
}
.meta--full .meta__category::before {
    content: "in ";
}
.meta--full .am-circle {
    margin: 1em auto;
}

.category--full,
.title--full,
.meta--full .am-circle,
.meta--full .meta__author,
.meta--full .meta__date,
.meta--full .meta__reading-time {
    opacity: 0;
}

.content__item p {
    opacity: 0;
}

.category--full,
.title--full {
    -webkit-transform: translate3d(0, 40px, 0);
    transform: translate3d(0, 40px, 0);
}
.meta--full .am-circle,
.meta--full .meta__author,
.meta--full .meta__date,
.meta--full .meta__reading-time {
    -webkit-transform: scale3d(0.5, 0.5, 1);
    transform: scale3d(0.5, 0.5, 1);
}



/*贝塞尔曲线效果*/
.content__item--show .category--full,
.content__item--show .title--full,
.content__item--show .meta--full .am-circle,
.content__item--show .meta--full .meta__author,
.content__item--show .meta--full .meta__date,
.content__item--show .meta--full .meta__reading-time {
    opacity: 1;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-transition: -webkit-transform 0.3s, opacity 0.3s;
    transition: transform 0.3s, opacity 0.3s;
    -webkit-transition-timing-function: cubic-bezier(0.2, 1, 0.3, 1);
    transition-timing-function: cubic-bezier(0.2, 1, 0.3, 1);
}
.content__item--show .category--full,
.content__item--show .title--full {
    -webkit-transition-timing-function: ease-out;
    transition-timing-function: ease-out;
}

.content__item--show .title--full {
    -webkit-transition-delay: 0.05s;
    transition-delay: 0.05s;
}

.content__item--show .meta--full .am-circle {
    -webkit-transition-delay: 0.2s;
    transition-delay: 0.2s;
}

.content__item--show .meta--full .meta__date {
    -webkit-transition-delay: 0.27s;
    transition-delay: 0.27s;
}

.content__item--show .meta--full .meta__reading-time {
    -webkit-transition-delay: 0.34s;
    transition-delay: 0.34s;
}

.content__item--show.content__item p {
    opacity: 1;
    -webkit-transition: opacity 0.5s 0.25s;
    transition: opacity 0.5s 0.25s;
}
